Spread Windows Forms 12.0 Product Documentation
AddValidators(CellRange,BaseDataValidator[]) Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class > AddValidators Method : AddValidators(CellRange,BaseDataValidator[]) Method
Adds validators to a cell range.
Syntax
'Declaration
 
Public Overloads Sub AddValidators( _
   ByVal cellRange As CellRange, _
   ByVal ParamArray validators() As BaseDataValidator _
) 
'Usage
 
Dim instance As SheetView
Dim cellRange As CellRange
Dim validators() As BaseDataValidator
 
instance.AddValidators(cellRange, validators)
public void AddValidators( 
   CellRange cellRange,
   params BaseDataValidator[] validators
)

Parameters

cellRange
validators
Example
This example adds a validator.
FarPoint.Win.Spread.CellStyleNotify stylenotify = new FarPoint.Win.Spread.CellStyleNotify();
stylenotify.InvalidCellStyle.BackColor = Color.Aquamarine;
FarPoint.Win.Spread.RangeValidator rvalid = new FarPoint.Win.Spread.RangeValidator();
rvalid.MaxValue = 10;
rvalid.MinValue = 0;
rvalid.Actions.Add(stylenotify);            
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), rvalid);
Dim stylenotify As New FarPoint.Win.Spread.CellStyleNotify()
stylenotify.InvalidCellStyle.BackColor = Color.Aquamarine
Dim rvalid As New FarPoint.Win.Spread.RangeValidator()
rvalid.MaxValue = 10
rvalid.MinValue = 0
rvalid.Actions.Add(stylenotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), rvalid)
See Also

Reference

SheetView Class
SheetView Members
Overload List